

#ifndef     PEDO_ALGORITHM_H_
#define     PEDO_ALGORITHM_H_
#define     INDEX_FORWARD_MAX(v,max)          do{if(++(v) >= (max)) v = 0;}while(0)   //index增加
#include "stdint.h"

typedef enum
{
    PEDO_WAVE_STATE_STANDBY,
    PEDO_WAVE_STATE_FIND_PEAK,
    PEDO_WAVE_STATE_FIND_VALLEY,
}pedo_wave_state_t;

void pedo_algorithm(int16_t x, int16_t y, int16_t z);
uint8_t pedo_algorithm_get_step(void);
uint8_t pedo_algorithm_get_active(void);
uint8_t pedo_algorithm_if_static(void);
#endif
